<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="js/vue.min.js"></script>
    <style>
        .aa {
            border: 3px red solid;
        }
    </style>
</head>
<body>
<!--bind用于绑定标签属性 -->
<div id="app">
    <img :src="src" alt="" :class="{aa: showCss}" :title="title">
    <input type="button"@click="change_img" value="改变样式">

</div>
<script>
    new Vue({
        el: "#app",
        data: {
            title: "xxx",
            showCss: true,
            src: "https://dss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=3469716026,2816395410&fm=26&gp=0.jpg",
        },
        methods:{
            change_img(){
                this.showCss =! this.showCss;
            }
        }
    })
</script>
</body>
</html>